package com.mdd.common.mapper.order;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mdd.common.core.basics.IBaseMapper;
import com.mdd.common.dto.OrderDto;
import com.mdd.common.dto.OrderGroupDto;
import com.mdd.common.dto.result.OrderGroupResultDto;
import com.mdd.common.dto.result.OrderPageResultDto;
import com.mdd.common.entity.order.Order;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 订单Mapper
 */
@Mapper
public interface OrderMapper extends IBaseMapper<Order> {

    Page<OrderPageResultDto> page(Page page, @Param("form") OrderDto form);

    Page<OrderPageResultDto> salesmanPage(@Param("page") Page page, @Param("form") OrderDto form);

    List<OrderGroupResultDto> groupSalesAmount(@Param("form") OrderGroupDto form);

    Page<OrderPageResultDto> listWaitComment(@Param("page") Page page, @Param("form") OrderDto orderDto);

    List<OrderPageResultDto> listFinishOrder(@Param("userId") Long userId);

    List<OrderPageResultDto> countList(@Param("form") OrderDto form);

    List<Long> countGetId(@Param("form") OrderDto form);
}
